/**
 * Copyright (c) 2015-2015 All Rights Reserved.
 */
package com.zbest.common.lang.exception;

import com.zbest.common.lang.enums.BizCode;

/**
 *
 */
public class ZpayException extends RuntimeException {

    /**  */
    private static final long serialVersionUID = 2312696041858357878L;

    private BizCode           code;

    private String            msg;

    public ZpayException(BizCode code, Exception e) {
        super(e);
        this.code = code;
    }

    public ZpayException(BizCode code, String msg) {
        super(code.code() + ":" + code.desc() + ":" + msg);

        this.code = code;
        this.msg = msg;
    }

    public ZpayException(BizCode code) {
        super(code.code() + ":" + code.desc());
        this.code = code;
    }

    /**
     * Getter method for property <tt>code</tt>.
     * 
     * @return property value of code
     */
    public BizCode getCode() {
        return code;
    }

    /**
     * Getter method for property <tt>msg</tt>.
     * 
     * @return property value of msg
     */
    public String getMsg() {
        return msg;
    }

}
